package handle

import (
	"fileServer/global"
	"github.com/gin-gonic/gin"
)

type Path struct {
	Path string `json:"path"`
	Dir  string `json:"dir"`
}

func ParsePath(c *gin.Context) (path Path, err error) {
	path = Path{}
	err = c.BindJSON(&path)
	if err != nil {
		global.GetResult(c).Error(400001, "参数错误", err.Error())
		return
	}
	return
}
